package com.fy56.platform.logistics.controller;

import com.fy56.platform.logistics.common.BaseController;
import com.fy56.platform.logistics.common.ResultModel;
import com.fy56.platform.logistics.model.Menu;
import com.fy56.platform.logistics.service.web.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 菜单Controller
 * Created by li on 2018-02-09.
 */
@RestController
@RequestMapping("/controller/menu")
public class MenuController extends BaseController {

    @Autowired
    private IMenuService iMenuService;

    /**
     * 查询菜单
     *
     * @return
     */
    @RequestMapping(value = "/findList", method = RequestMethod.POST)
    @ResponseBody
    public ResponseEntity<ResultModel> findList(){
        return  new ResponseEntity<>(ResultModel.ok(iMenuService.findList(new Menu())), HttpStatus.OK);
    }

}
